Cache-Conscious Memory Management

نویسندگان

  • Chen Ding
  • Pengcheng Li
چکیده

Dynamic memory allocation must solve the re-allocation problem: where to place a new object. Current techniques of malloc and GC are designed with cache locality in mind. However, it is unclear how to cleanly separate the locality effect in these techniques. This paper outlines a locality theory for dynamic memory allocation. It presents a new metric called the reallocation distance, a way to compute the ideal locality, a linear-time algorithm to measure actual locality, and suggestions for using the theory in improving the design of memory allocators. 1. Reallocation Distance The heap space used to store an object is called a heap slot. The allocation events are of two types, allocation and free. In an execution, the events are interleaved in a linear sequence. The reallocation distance is defined for every allocation event. Let t be the time object o is allocated to heap slot A and t0 the time when A is last freed, i.e. the latest free before t. The reallocation distance is the number of heap slots involved in either allocation or free between t0 and t, including A. When a heap slot is used for the first time, it has no last free time. We say the reallocation distance is infinite. The new metric quantifies the effect of different memory allocations. Figure 1 shows two ways of allocating six objects in three heap slots and the reallocation distances for each allocation. The first way favors locality by always reusing the most recently freed heap slot. The effect is shown by the reallocation distance, which is shorter in the first way than in the second. Reallocation distance shows the locality of memory allocation. Specifically, the locality depends on the heap activity between the free of a heap slot and the subsequent reallocation of it. Good locality means as much heap reuse as possible, which means to minimize the number of heap slots involved, that is, to minimize the reallocation distance. 2. Optimal Allocation Locality We call the locality in memory allocation the allocation locality. The scientific (i.e. quantitative) definition of allocation locality is the reallocation distance. The two are synonymous in this paper. Furthermore, optimal allocation locality means the minimal reallocation distance. This section outlines an algorithm to compute the optimal locality. A

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

\threads: a System for the Support of Concurrent Programming". Technical Report

Many parallel applications are implemented using lightweight thread packages. The low overhead associated with user-level thread management encourages programmers to use threads to exploit ne-grain parallelism in an application. Although the overhead of explicit thread management can be very small, there is other overhead associated with lightweight threads: the time required to load data into ...

متن کامل

Towards pB+Trees in the Field: Implementation Choices and Performance

In recent years the relative speed difference between CPUs and main-memory has become so great that many applications, including database management systems, spend much of their time waiting for data to be delivered from mainmemory. In particular, B+-trees have been shown to utilize cache memory poorly, triggering the development of many cache-conscious indices. While early studies of cachecons...

متن کامل

CC-GiST: Cache Conscious-Generalized Search Tree for Supporting Various Fast Intelligent Applications

According to the advance of technologies, the speed gap between CPU and main memory is getting larger every year. Due to the speed gap, it was perceived important to make the most use of the cache residing between CPU and main memory, and there have been a lot of research efforts on this issue. Among those is the research on cache conscious trees for reducing the cost for accessing main memory ...

متن کامل

Reduction in Cache Memory Power Consumption based on Replacement Quantity

Today power consumption is considered to be one of the important issues. Therefore, its reduction plays a considerable role in developing systems. Previous studies have shown that approximately 50% of total power consumption is used in cache memories. There is a direct relationship between power consumption and replacement quantity made in cache. The less the number of replacements is, the less...

متن کامل

Reduction in Cache Memory Power Consumption based on Replacement Quantity

Today power consumption is considered to be one of the important issues. Therefore, its reduction plays a considerable role in developing systems. Previous studies have shown that approximately 50% of total power consumption is used in cache memories. There is a direct relationship between power consumption and replacement quantity made in cache. The less the number of replacements is, the less...

متن کامل

Flash-Conscious Cache Population for Enterprise Database Workloads

Host-side flash caching has lately emerged as a suitable and e↵ective means of accelerating enterprise workloads. However, cache management for flash-based caching is di↵erent from traditional DRAM-based caching. A flash cache sits underneath the DRAM cache. Its position in the hierarchy combined with the unique characteristics of flash, calls for a di↵erent cache management solution. Specifica...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2014